package com.itheima.flowcontrol.loop;

/**
 * for 循环 求1-10的奇数和
 */

public class ForPractise02 {
    public static void main(String[] args) {
        test01();

    }
    public static void test01(){
        int sum = 0;
        for (int i = 1; i <= 10; i++) {
            if(i % 2 == 1){
                sum += i;
            }

        }
        System.out.println(sum);
    }
}
